package com.example.rabbitmq.consumer;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class FanoutConsumer {

    @RabbitListener(queues = "test1_fanout_queue")
    public void fanout1(String message){
        System.out.println("广播监听1："+message);
    }

    @RabbitListener(queues = "test2_fanout_queue")
    public void fanout2(String message){
        System.out.println("广播监听2："+message);
    }
}
